<template>
  <div class="question-list">
    <div class="question-item">
      <div class="question-type">
        <span class="mr10px">{{ index + 1 }}</span
        >{{
          item.question_type
            | G(selectEnums.nice_question_lib_question.sub_type)
        }}
      </div>
      <div class="question-body">
        <!-- 单选多选 -->
        <single
          v-if="item.question_type === N_298 || item.question_type === N_299"
          :body="item"
        ></single>
        <!-- 填空 -->
        <fill v-if="item.question_type === N_301" :body="item"></fill>
        <!-- 判断 -->
        <judge v-if="item.question_type === N_300" :body="item"></judge>
        <!-- 简答-->
        <answer v-if="item.question_type === N_302" :body="item"></answer>
        <!-- 探究题  阅读题  听力题  -->
        <explore
          v-if="
            item.question_type === N_303 ||
              item.question_type === N_304 ||
              item.question_type === N_305
          "
          :body="item"
        ></explore>
        <!-- 完形填空 -->
        <cloze v-if="item.question_type === N_306" :body="item"></cloze>
        <!-- 题目校对的显示层 -->
        <!-- <proofread v-if="proofreadpage" :body="item" :pattern="pattern" :index="index"></proofread> -->
      </div>
    </div>

    <!-- 题目遮罩 -->
    <!-- <div class="question_meng_answer" v-if="Dialog"></div> -->
  </div>
</template>
<script>
import { myEnumsMixins } from '@/utils/mixins'
import single from './type/single'
import fill from './type/fill'
import judge from './type/judge'
import answer from './type/answer'
import explore from './type/explore'
import cloze from './type/cloze'
export default {
  data () {
    return {
      list: [],
      N_298: this.returnRealValue('question_type_single'),
      N_299: this.returnRealValue('question_type_multiple'),
      N_300: this.returnRealValue('question_type_judge'),
      N_301: this.returnRealValue('question_type_fill'),
      N_302: this.returnRealValue('question_type_answer'),
      N_303: this.returnRealValue('question_type_explore'),
      N_304: this.returnRealValue('question_type_read'),
      N_305: this.returnRealValue('question_type_listen'),
      N_306: this.returnRealValue('question_type_cloze')
    }
  },
  props: {
    item: {
      type: Object,
      default: function () {
        return {}
      }
    },
    index: {
      type: Number,
      default: 0 // 第几题
    }
  },
  mixins: [myEnumsMixins],
  components: {
    single,
    fill,
    judge,
    answer,
    explore,
    cloze
    // proofread: resolve => require(['./proofread_list.vue'], resolve)
  },
  methods: {},
  created () {},
  mounted () {}
}
</script>

<style lang="scss">
.question-list {
  position: relative;
  .mr10px {
    margin-right: 10px;
  }
  p {
    margin: 0;
    padding: 0;
  }
  font-size: 14px;
  background: rgba(255, 255, 255, 1);

  .question_meng_answer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }

  .question-type {
    border-top: 2px solid #f5f5f5;
    border-bottom: 2px solid #f5f5f5;
    font-size: 14px;
    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
    font-weight: 500;
    color: rgba(51, 51, 51, 1);
    line-height: 36px;
    padding: 4px 28px;
  }
  .question-body {
    padding-left: 36px;
    padding-top: 16px;
    border-bottom: 5px solid #f5f5f5;
    padding-bottom: 16px;
    // height: 400px;
    padding-right: 16px;
    // overflow-y: auto;
  }
}
.button-list {
  height: 66px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  .btn {
    width: 81px;
    height: 30px;
    background: rgba(255, 235, 193, 1);
    border-radius: 6px;
    text-align: center;
    line-height: 30px;
    font-size: 12px;
    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
    font-weight: 500;
    color: rgba(51, 51, 51, 1);
    cursor: pointer;
    margin-right: 14px;
    &:hover {
      background: #ffbe33;
    }
  }
}
.question-list-move {
  position: relative;
  .mr10px {
    margin-right: 0.06rem;
  }
  p {
    margin: 0;
    padding: 0;
  }
  font-size: 0.18rem;
  background: rgba(255, 255, 255, 1);

  .question_meng_answer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }

  .question-type {
    padding: 0.06rem 0;
    border-top: 2px solid #f5f5f5;
    border-bottom: 2px solid #f5f5f5;
    font-size: 0.14rem;
    font-family: SourceHanSansCN-Medium, SourceHanSansCN;
    font-weight: 500;
    color: rgba(51, 51, 51, 1);
    line-height: 0.36rem;
    padding-left: 0.36rem;
  }
  .question-body {
    padding: 0.16rem 0.28rem;
    border-bottom: 0.05rem solid #f5f5f5;
    min-height: 3rem;
  }
}
</style>
